﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>橡树科技－JavaDemoSystem</title>
<link type="text/css" rel="stylesheet" href="../styles/global.css" />
<link type="text/css" rel="stylesheet" href="../styles/global_color.css" />
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-1.7.2.min.js"></script>
<script language="javascript" type="text/javascript">
	function deleteRole(roleId) {
		var r = window.confirm("确定要删除此角色吗？"+roleId);
		if(r){
			//执行删除
			location.href="${pageContext.request.contextPath}/role/remove?roleId="+roleId;
		}
	}
	//设置菜单高亮显示
	$(function(){
		$(".role_off").attr("class","role_on");
	});
</script>
</head>
<body>
	<div id="header">
		<img src="../images/logo.png" alt="logo" class="left" /> <a href="#">[退出]</a>
	</div>
	<div id="navi">
		<%@include file="/jsp/commen/menu.jsp" %>
	</div>
	<div id="main">
		<form id="serachForm"
			action="${pageContext.request.contextPath}/role/list" method="get">
			<div class="search_add">
				<!-- 隐藏框 隐藏附带当前页码和每页条数 -->
				<input type="hidden" name="currPage" id="currPage" /> 
				<input type="hidden" name="pageSize" id="pageSize" />
			<%-- 	<div>
					模块： <select id="selModules" name="moduleNames"
						class="select_search">
						<option value="">全部111</option>
						<option>角色管理</option>
						<option>管理员管理</option>
						<option>资费管理</option>
						<option>账务账号</option>
						<option>业务账号</option>
						<option>账单管理</option>
						<option>报表</option>
					</select>
				</div>
				<script type="text/javascript">
					$("option:contains(${roleInfoVo.moduleNames})").attr(
							"selected", "selected");
				</script>
				<div>
					角色： <input type="text" value="${roleInfoVo.roleName }"
						name="roleName" class="text_search width200" />
				</div>
				<div>
					<input type="submit" value="搜索" class="btn_search" />
				</div> --%>
				<!-- 点击跳转到增加页面 -->
				<input type="button" value="增加" class="btn_add"
					onClick="location.href='${pageContext.request.contextPath}/role/toAddJsp';" />
			</div>
			<div id="operate_result_info" class="operate_success">
				<img src="../images/close.png"
					onClick="this.parentNode.style.display='none';" /> 删除成功！
			</div>
			<div id="data">
				<table id="datalist">
					<tr>
						<th>角色 ID</th>
						<th>角色名称</th>
						<th class="width600">拥有的权限</th>
						<th class="td_modi"></th>
					</tr>
					<c:forEach items="${page.list }" var="roleInfoVo">
						<tr>
							<td>${roleInfoVo.roleId }</td>
							<td>${roleInfoVo.roleName }</td>
							<td>${roleInfoVo.moduleNames }</td>
							<td><input type="button" value="修改" class="btn_modify"
								onClick="location.href='${pageContext.request.contextPath}/role/toModiJsp?roleId=${roleInfoVo.roleId }'" />
								<input type="button" value="删除" class="btn_delete"
								onClick="deleteRole('${roleInfoVo.roleId}');" /></td>
						</tr>
					</c:forEach>

				</table>
			</div>
			<div id="pages">
				<%@include file="/jsp/commen/page.jsp"%>
			</div>
		</form>
	</div>
	<div id="footer">
		<p>[源自顶端的技术，最优秀的师资，最真实的企业环境，最适用的实战项目]</p>
		<p>版权所有(C)橡树科技IT培训集团公司</p>
	</div>
</body>
</html>
